package com.superb.allocation.api.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import com.baomidou.mybatisplus.annotation.TableName;
import com.superb.common.database.entity.BaseEntity;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 文件存储
 * @Author: ajie
 * @CreateTime: 2024-7-4
 */
@Data
@Tag(name = "文件存储")
@TableName("allocation_file")
@EqualsAndHashCode(callSuper=false)
public class AllocationFile extends BaseEntity {

    @NotBlank(message = "文件名称不能为空")
    @Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String name;

    @NotBlank(message = "阿里云url不能为空")
    @Schema(description = "阿里云url", requiredMode = Schema.RequiredMode.REQUIRED)
    private String url;

    @Schema(description = "文件类型")
    private String type;

    @Schema(description = "文件大小")
    private Long size;

    @NotBlank(message = "桶中路径不能为空")
    @Schema(description = "桶中路径", requiredMode = Schema.RequiredMode.REQUIRED)
    private String path;

}